package com.cdd.servicebankcard.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface BaseMapper {
    
    @Insert("insert into local_try_log values(#{txNo},now());")
    int addTry(String localTradeNo);
    
    @Insert("insert into local_confirm_log values(#{txNo},now());")
    int addConfirm(String localTradeNo);
    
    @Insert("insert into local_cancel_log values(#{txNo},now());")
    int addCancel(String localTradeNo);
    
    @Select("select count(1) from local_try_log where tx_no = #{txNo} ")
    int isExistTry(String localTradeNo);
    
    @Select("select count(1) from local_confirm_log where tx_no = #{txNo} ")
    int isExistConfirm(String localTradeNo);

    @Select("select count(1) from local_cancel_log where tx_no = #{txNo} ")
    int isExistCancel(String localTradeNo);
}